package com.warren.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.warren.system.entity.Department;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author warren
 * @since 2021-03-22
 */
@Repository
public interface DepartmentMapper extends BaseMapper<Department> {
    /**
     * 查询部门数量
     */
    List<Department> findDeptAndCount();

    /**
     *
     * @param wrapper 条件
     * @return 部门数量
     */
    List<Department> getDeptAndCount(@Param(Constants.WRAPPER)QueryWrapper<Department> wrapper);


}
